
<template>
  <el-table
    :data="tableData"
    style="width: 100%"
    :show-header="showHeader">
    <el-table-column
      width="180" prop="date">
    </el-table-column>
    <el-table-column
      width="180" prop="name">
    </el-table-column>
    <el-table-column >
      <template #default="scope">
        <el-button
          size="medium"
          @click="handleEdit(scope.$index, scope.row)"  >申请</el-button>
      </template>
    </el-table-column>
  </el-table>

</template>

<script>
  export default {
    data() {
      return {
        showHeader:false,
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, ]
      }
    },
    methods: {
      handleEdit(index, row) {
        console.log(index, row);
      },
    }
  }
</script>

<style lang="scss" scoped>
.el-table{
    margin-top: 20px;
}
</style>
